home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10112 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: news.unige.it!news
  2. From: aoddera@igecuniv.cisi.unige.it (Alessandro Oddera)
  3. Newsgroups: comp.os.ms-windows.programmer.tools,com.os.ms-windows.programmer.tools.misc,comp.os.ms-windows.win95.misc,comp.lang.c++
  4. Subject: Re: Reboot for Windows - reset.com (0/1)
  5. Date: Tue, 05 Mar 1996 23:20:06 GMT
  6. Organization: Univ. of Genoa, Italy
  7. Message-ID: <4hii5r$kv3@alpha.cisi.unige.it>
  8. References: <4h46en$r9b@mn5.swip.net> <4h4u8n$c14@cloner3.netcom.com>
  9. NNTP-Posting-Host: tscisi15.cisi.unige.it
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Et voila', my Reset.
  13.  
  14. {$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,R-,S-,V-,X-}
  15. {$M 1024,0,1008}
  16.  
  17. procedure cls; assembler;
  18.   asm
  19.   mov ah, 06h    {cancella video}
  20.   mov al, 0
  21.   mov bh ,7
  22.   mov ch, 0
  23.   mov cl, 0
  24.   mov dh, 25
  25.   mov dl, 80
  26.   int 10h
  27.   mov ah, 0Fh    {legge pagina video in bh}
  28.   int 10h
  29.   mov ah, 02     {fissa posizione cursore}
  30.   mov dh, 1
  31.   mov dl, 0
  32.   int 10h
  33.   end;
  34.  
  35. procedure NoTestMemory; assembler;
  36.   asm
  37.   CLI
  38.   MOV AX, 40
  39.   MOV DS, AX
  40.   MOV WORD PTR [$0072], $1234
  41.   END;
  42.  
  43. var i: byte absolute $0:$0417;
  44. begin
  45. cls;
  46. writeln ('*** SYSTEM RESET *** by Alessandro Oddera');
  47. writeln ('    RESET/H for Hard Reset');
  48. {i:= (i or 32) ;} { accende NumLock}
  49. {if ( paramstr(1)<> '/h') OR (paramstr(1) <> '/H' ) then 
  50. NoTestMemory;}
  51. {
  52. asm JMP $FFFF
  53. DS
  54. }
  55.  
  56. inline ($EA /$00 /$00 /$FF /$FF);  {Jmp FFFF:0000}
  57.  
  58. {
  59. inline ($FA /$B8 /$40 /$00  /$8E /$D8 /$C7 /$06  /$72 /$0
  60. 0 /$34
  61. /$12  /$EA /$00 /$00 /$FF /$FF);
  62. }
  63. {
  64. asm
  65. INT 17
  66. INT 18
  67. INT 25
  68. end;
  69. }
  70.  
  71. writeln ('Non Lo Scrivero'' mai');
  72. end.
  73.  
  74.  
  75. sstrader@ix.netcom.com (Scott Strader ) wrote:
  76.  
  77. >In <4h46en$r9b@mn5.swip.net> m-27103@mailbox.swipnet.se (Walter Lam) 
  78. >writes: 
  79.  
  80. >>
  81. >>Does anyone know where I can get the source code, or executable for a PC 
  82. >>reboot program under Windows?  I've got one for dos, but it doesn't work 
  83. >>under windows/windows 95......
  84. >>
  85. >>Thanks in Advance
  86. >>
  87. >>
  88.  
  89. >Look at the API funciton ExitWindowsEx().
  90.  
  91. >Scott S.
  92. >sstrader@ix.netcom.com
  93.  
  94. /-------------------------------------------------------\
  95. | NetSlide 2.0 - SLD & RND Autocad & Netscape Viever    | 
  96. | for Windows 3.1, 95 and NT. Aim your Web browser at   | 
  97. | http://www.archserver.unige.it/caadge/ao/homeao.htm   | 
  98. | to get your own copy!                                 | 
  99. \-------------------------------------------------------/
  100.  
  101.